home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / June 96 / Creating part < prev    next >
Encoding:
Internet Message Format  |  1996-12-03  |  1.8 KB  |  [TEXT/ttxt]

  1. Subject:     Creating part
  2. Sent:        6/19/96 11:33 PM
  3. Received:    6/24/96 8:25 AM
  4. From:        Steinar.Tyvand@si.sintef.no
  5. Reply-To:    ODF Interest, ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8. I mailed this in some days ago, but try again:
  9.  
  10. -Damon, Quality ODF Guy, wrote:
  11.  
  12. >Second, you need to obtain a reference to your document's draft and ask the
  13. >draft to create a new ODPart.  Given an FW_CPart, the following code will
  14. >work:
  15. >
  16. >        ODStorageUnit*          su = myPart -> GetStorageUnit (ev);
  17. >        ODDraft*                draft = su -> GetDraft (ev);
  18. >        FW_CAcquiredODPart      newPart = draft ->
  19. >                                        CreatePart (ev, kTextKind,
  20. kODNoEditor);
  21. >
  22. >Note that in the above code, kTextKind would be the full ISO string
  23. >describing the kind of data to be embedded.  kODNoEditor signifies that
  24. >OpenDoc should feel free to choose which editor to use for the embedded
  25. >data.  Instead, this parameter could be an ISO string for a particular
  26. >editor.
  27. >
  28.  
  29. My question is then:
  30. Can I pass "kMyEmbeddedKind" and "kMyEmbeddedEditor" in the
  31. draft->CreatePart function to create a part of my (embedded) kind?
  32.  
  33. Should I include the defines for embedded kind and editor in Binding.k for
  34. the EMBEDDING part? Is that enough to have CreatePart do the right things?
  35.  
  36. Steinar
  37. --------------------------------------------------------------
  38. Steinar Tyvand             e-mail: Steinar.Tyvand@unimed.sintef.no
  39. SINTEF Unimed Rehab        Phone:  +47 22 06 78 29 (work)
  40. Box 124 Blindern           Fax:    +47 22 06 79 09 (work)
  41. N-0314 Oslo                Phone:  +47 67 56 17 79 (home)
  42. Norway                     Fax:    +47 67 56 05 36 (home)
  43. --------------------------------------------------------------
  44.